<< QuantLib`

plotopts = 
      Sequence[TextStyle -> {FontFamily -> "Helvetica"}]

Intro

Nielsen p. 53

instr = EuropeanOption[100, 0.5, CallOption];

?SVJDModel

svmodel := 
      SVJDModel[100, 0, 0, Sqrt[0.01], 0.1, Sqrt[0.01], 2, 0, 0, 0, 
        0]

Volatility of volatility

bsmodel1 = BlackScholesModel[instr, svmodel]

svmodelsigmav[sigmav_] := ReplacePart[svmodel, sigmav, 5]

bsgr1 = 
      Plot[PDF[instr, bsmodel1, Log[ST/100]], {ST, 70, 130}, 
        PlotStyle -> {GrayLevel[0.6]}, Evaluate[plotopts]]

svjdgr1 = 
      Plot[
{PDF[instr, svmodelsigmav[0.1], 
            Log[ST/100]], 
PDF[instr, svmodelsigmav[0.2], 
            Log[ST/100]], 
PDF[instr, svmodelsigmav[0.3], 
            Log[ST/100]]}, 
{ST, 70, 
          130}, 
PlotStyle -> {Dashing[{0, 0.02, 0.03, 
                0.02}], Dashing[{0.01, 0.01}], Dashing[{0.05, 0.01}]}, 
        Evaluate[plotopts]]

Table[
      Skewness[instr, svmodelsigmav[sigmav]], {sigmav, 0.000001, 0.300001, 
        0.1}]

Table[
      KurtosisExcess[instr, svmodelsigmav[sigmav]], {sigmav, 0.000001, 
        0.300001, 0.1}]

kombgr1 = Show[bsgr1, svjdgr1]

Export["sigmav.eps", kombgr1]

Export["sigmav.wmf", kombgr1]

Correlation

svmodelcorr[corr_] := ReplacePart[svmodel, corr, 8]

bsmodel2 = BlackScholesModel[instr, svmodelcorr[0.3]]

bsmodel2n = BlackScholesModel[instr, svmodelcorr[-0.3]]

bsgr2 = 
      Plot[PDF[instr, bsmodel2, Log[ST/100]], {ST, 70, 130}, 
        PlotStyle -> GrayLevel[0.6], Evaluate[plotopts]]

svjdgr2 = 
      Plot[
{PDF[instr, svmodelcorr[-0.3], 
            Log[ST/100]], 
PDF[instr, svmodelcorr[0], 
            Log[ST/100]], 
PDF[instr, svmodelcorr[0.3], 
            Log[ST/100]]}, 
{ST, 70, 
          130}, 
PlotStyle -> {Dashing[{0, 0.02, 0.03, 
                0.02}], Dashing[{0.01, 0.01}], Dashing[{0.05, 0.01}]}, 
        Evaluate[plotopts]]

Table[
      Skewness[instr, svmodelcorr[corr]], {corr, -0.3, 0.3, 
        0.3}]

Table[
      KurtosisExcess[instr, svmodelcorr[corr]], {corr, -0.3, 0.3, 
        0.3}]

kombgr2 = Show[bsgr2, svjdgr2]

Export["corr.eps", kombgr2]

Export["corr.wmf", kombgr2]

Jump intensity

?SVJDModel

jdmodel := 
      SVJDModel[100, 0, 0, Sqrt[0.01], 0.00001, Sqrt[0.01], 2, 0, 0.5, 0, 
        0.1]

jdmodeljumpint[jumpint_] := ReplacePart[jdmodel, jumpint, 9]

bsmodel3 = BlackScholesModel[instr, jdmodeljumpint[0.5]]

bsgr3 = 
      Plot[PDF[instr, bsmodel3, Log[ST/100]], {ST, 70, 130}, 
        PlotStyle -> {GrayLevel[0.3]}, Evaluate[plotopts]]

svjdgr3 = 
      Plot[
{PDF[instr, jdmodeljumpint[0.5], 
            Log[ST/100]], 
PDF[instr, jdmodeljumpint[1], 
            Log[ST/100]], 
PDF[instr, jdmodeljumpint[2], 
            Log[ST/100]]}, 
{ST, 70, 
          130}, 
PlotStyle -> {Dashing[{0, 0.02, 0.03, 
                0.02}], Dashing[{0.01, 0.01}], Dashing[{0.05, 0.01}]}, 
        Evaluate[plotopts]]

Skewness[instr, jdmodeljumpint[#1]] &  /@  {0.5, 1, 2}

KurtosisExcess[instr, jdmodeljumpint[#1]] &  /@  {0.5, 1, 
        2}

kombgr3 = Show[bsgr3, svjdgr3]

Export["jumpint.eps", kombgr3]

Export["jumpint.wmf", kombgr3]

Jump mean

jdmodeljumpmean[jumpmean_] := 
      ReplacePart[jdmodel, jumpmean, 10]

bsmodel4 = BlackScholesModel[instr, jdmodeljumpmean[0.1]]

bsgr4 = 
      Plot[PDF[instr, bsmodel4, Log[ST/100]], {ST, 70, 130}, 
        PlotStyle -> {GrayLevel[0.6]}, Evaluate[plotopts]]

svjdgr4 = 
      Plot[
{PDF[instr, jdmodeljumpmean[0], 
            Log[ST/100]], 
PDF[instr, jdmodeljumpmean[0.1], 
            Log[ST/100]], 
PDF[instr, jdmodeljumpmean[0.2], 
            Log[ST/100]]}, 
{ST, 70, 
          130}, 
PlotStyle -> {Dashing[{0, 0.02, 0.03, 
                0.02}], Dashing[{0.01, 0.01}], Dashing[{0.05, 0.01}]}, 
        Evaluate[plotopts]]

Skewness[instr, jdmodeljumpmean[#1]] &  /@  {0, 0.1, 
        0.2}

KurtosisExcess[instr, jdmodeljumpmean[#1]] &  /@  {0, 0.1, 
        0.2}

kombgr4 = Show[bsgr4, svjdgr4]

Export["jumpmean.eps", kombgr4]

Export["jumpmean.wmf", kombgr4]

Jump dev

jdmodel2 = 
      SVJDModel[100, 0, 0, 0.1, 0.00001, 0.1, 2, 0, 0.5, 0.1, 0.1]

jdmodeljumpdev[jumpdev_] := 
      ReplacePart[jdmodel2, jumpdev, 11]

bsmodel5 = BlackScholesModel[instr, jdmodeljumpdev[0.05]]

bsgr5 = 
      Plot[PDF[instr, bsmodel5, Log[ST/100]], {ST, 70, 130}, 
        PlotStyle -> {GrayLevel[0.6]}, Evaluate[plotopts]]

svjdgr5 = 
      Plot[
{PDF[instr, jdmodeljumpdev[0.01], 
            Log[ST/100]], 
PDF[instr, jdmodeljumpdev[0.05], 
            Log[ST/100]], 
PDF[instr, jdmodeljumpdev[0.1], 
            Log[ST/100]]}, 
{ST, 70, 
          130}, 
PlotStyle -> {Dashing[{0, 0.02, 0.03, 
                0.02}], Dashing[{0.01, 0.01}], Dashing[{0.05, 0.01}]}, 
        Evaluate[plotopts]]

Skewness[instr, jdmodeljumpdev[#1]] &  /@  {0.01, 0.05, 
        0.1}

KurtosisExcess[instr, jdmodeljumpdev[#1]] &  /@  {0.01, 0.05, 
        0.1}

kombgr5 = Show[bsgr5, svjdgr5]

Export["jumpdev.eps", kombgr5]

Export["jumpdev.wmf", kombgr5]

Residual time SV

instrtime[time_] := ReplacePart[instr, time, 2]

bsmodel6 = BlackScholesModel[instrtime[0.5], svmodel]

bsgr6 = 
      Plot[PDF[instrtime[0.5], bsmodel6, Log[ST/100]], {ST, 70, 130}, 
        PlotStyle -> GrayLevel[0.6], Evaluate[plotopts]]

svjdgr6 = 
      Plot[
{PDF[instrtime[0.5], svmodel, 
            Log[ST/100]], 
PDF[instrtime[1], svmodel, 
            Log[ST/100]], 
PDF[instrtime[2], svmodel, 
            Log[ST/100]]}, 
{ST, 70, 
          130}, 
PlotStyle -> {Dashing[{0, 0.02, 0.03, 
                0.02}], Dashing[{0.01, 0.01}], Dashing[{0.05, 0.01}]}, 
        Evaluate[plotopts]]

Skewness[instrtime[#], svmodel] &  /@  {0.5, 1, 2}

KurtosisExcess[instrtime[#], svmodel] &  /@  {0.5, 1, 
        2}

kombgr6 = Show[bsgr6, svjdgr6]

Export["timesv.eps", kombgr6]

Export["timesv.wmf", kombgr6]

Residual time jumps

bsmodel7 = BlackScholesModel[instrtime[0.5], jdmodel]

bsgr7 = 
      Plot[PDF[instrtime[0.5], bsmodel7, Log[ST/100]], {ST, 70, 130}, 
        PlotStyle -> GrayLevel[0.6], Evaluate[plotopts]]

svjdgr7 = 
      Plot[
{PDF[instrtime[0.5], jdmodel, 
            Log[ST/100]], 
PDF[instrtime[1], jdmodel, 
            Log[ST/100]], 
PDF[instrtime[2], jdmodel, 
            Log[ST/100]]}, 
{ST, 70, 
          130}, 
PlotStyle -> {Dashing[{0, 0.02, 0.03, 
                0.02}], Dashing[{0.01, 0.01}], Dashing[{0.05, 0.01}]}, 
        Evaluate[plotopts]]

Skewness[instrtime[#], jdmodel] &  /@  {0.5, 1, 2}

KurtosisExcess[instrtime[#], jdmodel] &  /@  {0.5, 1, 
        2}

kombgr7 = Show[bsgr7, svjdgr7]

Export["timejump.eps", kombgr7]

Export["timejump.wmf", kombgr7]